
<div class="fieldsets">
        
    <!-- Search form -->
    <fieldset>
        <legend>Search projects</legend>
        <% form_remote_tag({:update => 'projects_list', :url => {:controller => 'projects', :action => 'search'}}) do%>
            <p><label for="search_name">Name or description:</label><br />
            <%= text_field('search','name',:size => 32)%></p>
            <p><label for="search_client_id">Client:</label><br />
            <%= select('search','client_id',Client.find_active.collect{|p| [ p.name, p.id ] }, {:include_blank => true })%></p>
            <p><%= submit_tag 'Search'%></p>
        <% end %>
    </fieldset>
    <!-- End of search form -->
    
    <br/><br/>
    
    <!-- List of projects -->
    <%if !@projects.blank? %>
        <div id="projects_list">
            <%= render :partial => 'list'%>
        </div>
    <%else%>
        <p id="errorNotice">No projects found</p>
        <%- if params[:search].nil? -%>
            <p><%= link_to 'New project', :action => 'new' %></p>
        <%- end -%>
    <%end%>
    <!-- End of list -->
    <%= back_link %>    
</div>
